package com.max.back.pharmacy.form;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.max.back.entity.Doctor;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @program:springbootapi
 * @description:医生大对象类
 * @Author:罗世奇
 * @create: 2022-07-23-23:22
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DoctorForm {
    @NotNull
    private String id;

    private Integer userType;

    private String userName;

    private String password;

    private String realName;

    private String phone;


    private Integer sex;


    private Integer age;


    private String doctorLevelId;

    private Boolean deleted;

    private Date gmtCreate;

    private Date gmtModify;

    private String token;

    public DoctorForm(Doctor doctor,String name,String token){
        this.id=doctor.getId();
        this.userName=doctor.getUserName();
        this.userType=doctor.getUserType();
        this.password=doctor.getPassword();
        this.realName=doctor.getRealName();
        this.phone=doctor.getPhone();
        this.sex=doctor.getSex();
        this.age=doctor.getAge();
        this.doctorLevelId=name;
        this.deleted=doctor.getDeleted();
        this.gmtCreate=doctor.getGmtCreate();
        this.gmtModify=doctor.getGmtModify();
        this.token=token;
    }
}
